#ifndef FKLIVEBUTTON_H
#define FKLIVEBUTTON_H

#include "FKObject.h"
#include "FKEventNames.h"

#include<QColor>

class FKLiveButtonReferent;

class FK_OBJECT (FKLiveButton,FKObject)
    Q_OBJECT
    Q_PROPERTY(QColor C_COLOR READ getColor WRITE C_color)
    Q_PROPERTY(qint32 cs READ score WRITE C_score)
    Q_PROPERTY(float cpo READ offset WRITE C_offset)
public:
//    FKLiveButton(FKRoom* room=0, qint32 objectID=-1);
//    ~FKLiveButton();
    void move(float xOffset);
    void setColor(const QColor &c);
    void setScore(qint32 score);
    void addScore(qint32 score);
    qint32 score() const{return _score;}
signals:
    void clicked(FKLiveButton* b);
private:
    void customInitialization();
    void customDeinitialization();
    void C_color(const QColor c);
    void C_score(const qint32 score);
    void C_offset(const float offset);
    QColor color() const{return _color;}
    QColor getColor() const{return servant->color;}
    float offset() const{return _xOffset;}
    void A_click(FKEvent* event);
    FKLiveButtonReferent* _view;
    QColor _color;
    qint32 _score;
    qint32 _lastScore;
    float _xOffset;

    struct Servant{
        QColor color;
    };
    struct CustomValues{};
//    FK_NO_CUSTOM_VALUES
};

#endif // FKLIVEBUTTON_H
